{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

{% block app_content %}
    <h1>Hi, {{ current_user.username }}!</h1>
    {% if form %}
        {{ wtf.quick_form(form) }}
    {% endif %}
    <br>
    {% for post in posts %}
        {% include '_post.html' %}
    {% endfor %}
    <br>
    <nav aria-label="...">
        <ul class="pager">
            <li class="previous{% if not prev_url %} disabled {% endif %}">
                <a href="{{ prev_url or '#' }}">
                    <span aria-hidden="true">&larr;</span> {{ _('上一页') }}
                </a>
            </li>
            <li>{{ _('第%(page)s页', page=page) }}</li>
            <li class="next{% if not next_url %} disabled {% endif %}">
                <a href="{{ next_url or '#' }}">
                     {{ _('下一页') }} <span aria-hidden="true">&rarr;</span>
                </a>
            </li>
        </ul>
    </nav>
{% endblock %}
